﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="Login.aspx.cs" Inherits="EXAM.Login"  %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <link href="css/login.css" rel="stylesheet" type="text/css" />
    <link href="css/colors-fresh.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .itemTemplate
        {
            width: 493px;
            height: 56px;
            margin-top: 4px;
            margin-bottom: 4px;
            cursor: pointer;
        }
        .backElement
        {
            background-image: url(   'IMAGES/main_back.jpg' );
            width: 569px;
            height: 242px; /*margin-left: auto;
            margin-right: auto;*/
        }
        .titleText
        {
        	color: white;
        	font-weight:bold;
        	font-size:15px;
            width: 314px;
            float: right;
            margin-right: 20px;
            padding-top: 10px;
        }
        .rotator
        {
            margin-left: 40px;
            margin-top: 15px;
            width: 493px;
            height: 200px;
            letter-spacing: 0;
        }
        .dateTime
        {
            width: 100px;
            height: 56px;
            float: left;
        }
        .title
        {
            width: 365px;
            margin-top: 14px;
            float: right;
        }
        .date
        {
            margin-top: 10px;
            color: White;
            float: right;
        }
        .time
        {
            margin-top: 5px;
            text-align: right;
            font-size: 20px;
        }
        .qsfClear
        {
            display: block;
            height: 24px;
        }
    </style>
    <script type="text/javascript">
    function goodbye(e) {
	        if(!e) e = window.event;
	        //e.cancelBubble is supported by IE - this will kill the bubbling process.
	        e.cancelBubble = true;
	        e.returnValue = 'You sure you want to leave?'; //This is displayed on the dialog

	        //e.stopPropagation works in Firefox.
	        if (e.stopPropagation) {
		        e.stopPropagation();
		        e.preventDefault();
	        }
        }
//        window.onbeforeunload=goodbye;
        </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">

    
    <h2 class="art-postheader" style="padding-left: 125px;">
        Welcome to ANI Vietname e-Learning
    </h2>
    <br />
    <div class="cleared">
    </div>
    <div class="art-postcontent">
        <div style="padding-left: 100px;">
            <div class="backElement">
                <div class="titleText">
                    Top Score
                    <br />
                </div>
                <div class="qsfClear">
                    <!--onclick="document.location='link'" -->
                </div>
                <telerik:RadRotator ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="Up"
                    ScrollDuration="2000" runat="server" Width="493px" ItemWidth="493px" Height="192px"
                    ItemHeight="64px" FrameDuration="1" InitialItemIndex="-1" CssClass="rotator">
                    <ItemTemplate>
                        <div class="itemTemplate" style="background-image: url('images/<%# GetDayOfWeek(Eval("Creation_Time").ToString()) %>.png');">
                            <div class="dateTime">
                                <div class="time">
                                    <%# (FormatPercent(Eval("Score").ToString()))%>
                                </div>
                                <div class="date">
                                    <%# (GetTimeOnly(Eval("Display_Time").ToString()))%>
                                </div>
                            </div>
                            <div class="title">
                                <span>
                                    <%# System.Web.HttpUtility.HtmlEncode(Eval("Desc").ToString())%>
                                </span>
                            </div>
                        </div>
                    </ItemTemplate>
                </telerik:RadRotator>
            </div>
            <div id="login" align="right">
            <div id="loginform" class="form">
                <p>
                    Please login to pratice more.
                    <br />
                    <label>
                        User name<asp:TextBox ID="txtUsername" runat="server" size="20" 
                        CssClass="user_login input" TabIndex="1"></asp:TextBox></label>
                </p>
                <p>
                    <label>
                        Password<asp:TextBox ID="txtPassword" runat="server" 
                        CssClass="user_pass input" size="20"
                            TextMode="Password" TabIndex="2"></asp:TextBox></label>
                </p>
                <p class="submit">
                    <asp:Button ID="btLogin" runat="server" CssClass="button-primary" 
                        Skin="Sunset" Text="Login" 
                        Width="100px" onclick="btLogin_Click" TabIndex="3" >
                    </asp:Button>                    
                </p>
                <asp:Label ID="lbErr" runat="server" ForeColor="#FF3300"></asp:Label>
            </div>
        </div>
        </div>
        
    </div>
</asp:Content>
